<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/conn_db.php");?>
<?include ($_SERVER ["DOCUMENT_ROOT"] . "/lib/module/Util.php");?>
<?php //DB Open

	$result = null;
	$db = new MyDB ( false );
	$db->err_report = true;

	$util = new Util();
	$sid = $_GET['sid'];

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<? include "inc/inc_header.php" ?><!-- header -->
<style>
br{
	margin: 0px;
	padding: 0px;
}
</style>
 <body style="background-color:transparent"  >
<table width="954" border="0" cellspacing="0" cellpadding="0">
 <tr>
   <td align="right" class="text08" style="padding-bottom:10px;"><strong>[가나다順]</strong></td>
 </tr>
 
 <tr>
		<td><img src="img/bt_left_01.png"></td>
	  </tr>

	  <tr><td height="8"></td></tr>
	
	
	<tr>
		<td><img src="img/surn/cont_img08.jpg" width="954" height="10"></td>
	  </tr>
	  <tr>
		<td align="center" background="img/surn/cont_img10.jpg" style="padding:4px 0 4px 0;">

		<?php



	$sql = "SELECT article_sid, article_title from tb_board_article WHERE category_sid=".$sid." and  board_sid=2 and etc_cate='1' ORDER BY article_title ASC";
	$db->query ( $sql );
	$query = $db->result;
	$total = mysql_num_rows ($query);

	$i=0;
?>
<?php //DB Close

	//$db->close ();

?>
		  <?php if($total>0):?>
			<?php while($row = mysql_fetch_object($query)):?>
			  <?php if($i%15==0):?>
				<table width="914" border="0" cellspacing="0" cellpadding="0">
				  <tr>
			  <?php endif;?>
					<td <?php if($i%15!=14):?>width="62"<?php endif;?> height="28" class="text02">
						<table width="52" border="0" cellspacing="0" cellpadding="0">
							<tr>
							  <td height="46" align="center" class="text02"  style='line-height:110%'>
								<?php $name=explode("(",str_replace(")","",trim($row->article_title)));?>
									<a href="pup02.php" class="su" onclick="top.popup(this.href+'?sid=<?php echo $row->article_sid;?>', '460','336');return false" ><?php echo $name[0];?></br>(<?php echo $name[1];?>)</a>
							  </td>
                           </tr>
                       </table>
					</td>
			  <?php if ($i%15!=0 && $i+1==$total) :?>
				<?php $q = $i%15+1;;?>
				<?php for ($j=0; $j<14-($i%15); $j++) :?>
					<td <?php if($q%15!=14):?>width="62"<?php endif;?> height="28" class="text02">&nbsp;</td>
					<?php $q++;?>
				<?php endfor;?>
			  <?php endif;?>
			  <?php if($i%15==14 || $i+1==$total):?>
				  </tr>
				</table>
			  <?php endif;?>
			  <?php $i++;?>
			<?php endwhile;?>
		  <?php endif;?>
		</td>
	  </tr>
	  <tr>
		<td><img src="img/surn/cont_img09.jpg" width="954" height="10"></td>
	  </tr>


<!----------------------------------------------------------------------------------------------------------------------->
<tr><td height="20"></td></tr>
	  <tr>
		<td>
			<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><img src="img/bt_left_02.png"></td>
				<td valign="bottom"><!-- &nbsp;&nbsp;<span style="font-size:12px; color:green;">* 아래란은 입향조 및 입도조를 게재하는 란입니다. (문의 02-403-9884, 팩스 02-406-7664)</span> --></td>
			</tr>
			</table>
		</td>
	  </tr>

	  <tr><td height="8"></td></tr>
	
	
	<tr>
		<td><img src="img/surn/cont_img08.jpg" width="954" height="10"></td>
	  </tr>
	  <tr>
		<td align="center" background="img/surn/cont_img10.jpg" style="padding:4px 0 4px 0;">

		<?php



	$sql = "SELECT article_sid, article_title from tb_board_article WHERE category_sid=".$sid." and  board_sid=2 and (etc_cate='2' or  etc_cate='') ORDER BY article_title ASC";
	$db->query ( $sql );
	$query = $db->result;
	$total = mysql_num_rows ($query);

	$i=0;
?>
<?php //DB Close

	//$db->close ();

?>
		  <?php if($total>0):?>
			<?php while($row = mysql_fetch_object($query)):?>
			  <?php if($i%15==0):?>
				<table width="914" border="0" cellspacing="0" cellpadding="0">
				  <tr>
			  <?php endif;?>
					<td <?php if($i%15!=14):?>width="62"<?php endif;?> height="28" class="text02">
						<table width="52" border="0" cellspacing="0" cellpadding="0">
							<tr>
							  <td height="46" align="center" class="text02"  style='line-height:110%'>
								<?php $name=explode("(",str_replace(")","",trim($row->article_title)));?>
									<a href="pup02.php" class="su" onclick="top.popup(this.href+'?sid=<?php echo $row->article_sid;?>', '460','336');return false" ><?php echo $name[0];?></br>(<?php echo $name[1];?>)</a>
							  </td>
                           </tr>
                       </table>
					</td>
			  <?php if ($i%15!=0 && $i+1==$total) :?>
				<?php $q = $i%15+1;;?>
				<?php for ($j=0; $j<14-($i%15); $j++) :?>
					<td <?php if($q%15!=14):?>width="62"<?php endif;?> height="28" class="text02">&nbsp;</td>
					<?php $q++;?>
				<?php endfor;?>
			  <?php endif;?>
			  <?php if($i%15==14 || $i+1==$total):?>
				  </tr>
				</table>
			  <?php endif;?>
			  <?php $i++;?>
			<?php endwhile;?>
		  <?php endif;?>
		</td>
	  </tr>
	  <tr>
		<td><img src="img/surn/cont_img09.jpg" width="954" height="10"></td>
	  </tr>
<!----------------------------------------------------------------------------------------------------------------------->

<!----------------------------------------------------------------------------------------------------------------------->
<tr><td height="20"></td></tr>
	  <tr>
		<td>
			<table border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><img src="img/bt_left_03.png"></td>
				<td valign="bottom">&nbsp;&nbsp;<span style="font-size:14px; color:red;">* 수정할 부분이나 추가 등재를 원하시면(개인 또는 문중) 본회 상담센터(02-403-9884/ 팩스 02-406-7664)로 연락바랍니다.</span></td>
			</tr>
			</table>
		</td>
	  </tr>

	  <tr><td height="8"></td></tr>
	
	
	<tr>
		<td><img src="img/surn/cont_img08.jpg" width="954" height="10"></td>
	  </tr>
	  <tr>
		<td align="center" background="img/surn/cont_img10.jpg" style="padding:4px 0 4px 0;">

		<?php



	$sql = "SELECT article_sid, article_title from tb_board_article WHERE category_sid=".$sid." and  board_sid=2 and etc_cate='3' ORDER BY article_title ASC";
	$db->query ( $sql );
	$query = $db->result;
	$total = mysql_num_rows ($query);

	$i=0;
?>
<?php //DB Close

	$db->close ();

?>
		  <?php if($total>0):?>
			<?php while($row = mysql_fetch_object($query)):?>
			  <?php if($i%15==0):?>
				<table width="914" border="0" cellspacing="0" cellpadding="0">
				  <tr>
			  <?php endif;?>
					<td <?php if($i%15!=14):?>width="62"<?php endif;?> height="28" class="text02">
						<table width="52" border="0" cellspacing="0" cellpadding="0">
							<tr>
							  <td height="46" align="center" class="text02"  style='line-height:110%'>
								<?php $name=explode("(",str_replace(")","",trim($row->article_title)));?>
									<a href="pup02.php" class="su" onclick="top.popup(this.href+'?sid=<?php echo $row->article_sid;?>', '460','336');return false" ><?php echo $name[0];?></br>(<?php echo $name[1];?>)</a>
							  </td>
                           </tr>
                       </table>
					</td>
			  <?php if ($i%15!=0 && $i+1==$total) :?>
				<?php $q = $i%15+1;;?>
				<?php for ($j=0; $j<14-($i%15); $j++) :?>
					<td <?php if($q%15!=14):?>width="62"<?php endif;?> height="28" class="text02">&nbsp;</td>
					<?php $q++;?>
				<?php endfor;?>
			  <?php endif;?>
			  <?php if($i%15==14 || $i+1==$total):?>
				  </tr>
				</table>
			  <?php endif;?>
			  <?php $i++;?>
			<?php endwhile;?>
		  <?php endif;?>
		</td>
	  </tr>
	  <tr>
		<td><img src="img/surn/cont_img09.jpg" width="954" height="10"></td>
	  </tr>
<!----------------------------------------------------------------------------------------------------------------------->


	</table>
 </body>
</html>
